public class Circular {
    double r;

    public double perimeter() {
        double perimeter = 3.14 * 2 * r;
        return perimeter;
    }

    public double area() {
        double area = 3.14 * r * r;
        return area;
    }
}
//圆的属性有半径和坐标(x,y轴），要求添加方法，计算圆的面积和周长（返回值的方式）。
public class Oppzy01 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        Circular c = new Circular();
        System.out.println("Please input circular's R:");
        c.r = in.nextDouble();
        double cc = c.perimeter();
        double ss = c.area();
        System.out.println("The perimeter is " + cc);
        System.out.println("The area is " + ss);
    }
}